class Admin::SettingsController < Admin::AdminController
  before_filter :load_object

  add_crumb("Nastavení", :only => :show) {}
  add_crumb("Nastavení", :admin_setting_path, :except => :show)
  add_crumb("Editace nastavení", :only => [:edit, :update]) {}

  def update
    if @setting.update_attributes(params[:setting])
      redirect_to admin_setting_path, :notice => "Nastavení bylo úspěšně uloženo."
    else
      render :action => :show
    end
  end

  protected
  def load_object
    @setting = Setting.first
  end
end
